package info.fqtech.weipan.entity;

import lombok.Getter;
import lombok.ToString;

/**
 * @description: 行情处理规则
 * @modification: <修改说明>
 * @author: jack
 * @time: 16:04 2017/12/21
 * @version: 0.1
 */
@Getter
@ToString
public class QuoteHandleRule {
    // 行情代码
    private String code;
    // 行情乘数
    private double multiplier = 1.0;
    // 行情小数位数
    private int digit = 2;
    // 报价相差值，大于相差值过滤掉
    private double diff = 0;

    /**
     * 构造方法
     * @param code -- 编码
     * @param multiplier --乘数
     * @param digit -- 小数位数
     * @param diff -- 本次报价与上次报价相差值，超过此值丢弃
     */
    public QuoteHandleRule(String code, double multiplier, int digit, double diff) {
        this.code = code;
        this.multiplier = multiplier;
        this.digit = digit;
        this.diff = diff;
    }
}
